﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - E-Supervison</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")

</head>
<body>
    @if (Request.IsAuthenticated)
    { 
        <div class="navbar navbar-inverse navbar-fixed-top">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    @if (User.IsInRole("Authorised"))
                    {
                        @Html.ActionLink("E-Supervison", "Index", "AuthorisedHome", null, new { @class = "navbar-brand" })
                    }
                    else
                    {
                        @Html.ActionLink("E-Supervison", "Index", "Home", null, new { @class = "navbar-brand" })
                    }
                </div>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        @if (User.IsInRole("Authorised"))
                        {
                            <li>@Html.ActionLink("Dashboard", "StaffDashboard", "Dashboard")</li>
                            <li>@Html.ActionLink("Allocate Student", "Index", "Allocating")</li>
                            <li>@Html.ActionLink("About", "About", "Home")</li>
                        }
                        else if (User.IsInRole("Teacher"))
                        {
                            <li>@Html.ActionLink("Dashboard", "TeacherDashboard", "Dashboard")</li>
                            <li>@Html.ActionLink("Messaging", "Index", "Message")</li>
                            <li>@Html.ActionLink("Document", "TeacherIndex", "Document")</li>
                            <li>@Html.ActionLink("Meeting", "Index", "Meeting")</li>
                            <li>@Html.ActionLink("Forum", "Index", "ForumTopic")</li>
                            <li>@Html.ActionLink("About", "About", "Home")</li>
                        }
                        else
                        {
                            <li>@Html.ActionLink("Dashboard", "Index", "Dashboard")</li>
                            <li>@Html.ActionLink("Messaging", "Index", "Message")</li>
                            <li>@Html.ActionLink("Document", "Index", "Document")</li>
                            <li>@Html.ActionLink("Meeting", "Index", "Meeting")</li>
                            <li>@Html.ActionLink("Forum", "Index", "ForumTopic")</li>
                            <li>@Html.ActionLink("About", "About", "Home")</li>
                        }
                    </ul>
                    @Html.Partial("_LoginPartial")
                </div>
            </div>
        </div>
    }
    <div class="container body-content">
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; @DateTime.Now.Year - E-Supervison</p>
        </footer>
    </div>

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)
</body>
</html>
